<?php
class User extends AppModel{
	var $name='User';
	public function authenticate($username, $password){
		//$data=$this->find('first',array('conditions'=>array('username'=>$username,'password'=>sha1("$password"))));		
		$data=$this->find('first',array('conditions'=>array('username'=>$username,'password'=>$password)));
		if(is_array($data)){return $data;}		
		return false;
	}
}
?>